package com.t282.crm.service;

import com.t282.crm.entity.Right;
import com.t282.crm.entity.Role;
import com.t282.crm.entity.User;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;
import java.util.Map;

public interface RoleService {
    public List<Role> findAllRoles();

    //权限查询
    public List<Right> findAllRights(); //查询所有权限
    public List<Right> findRightsByRole(Role role); //根据角色查询权限

    public Role saveRole(Role role);
    public void deleteRoleById(Long roleId);
    public void deleteRole(Role role);
    public Role getRole(Long roleId);
    public Page<Role> findRole(String roleName, Pageable pageable);

    public Role findRoleByUsers(User user);

    public Map<String,String> loadFilterChainDefinitions();

    public void reloadFilterChainDefinitions();
}
